package com.icepeach.icepeachhomeback.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.icepeach.icepeachhomeback.entity.Menu;
import com.icepeach.icepeachhomeback.req.MenuListQueryReq;

import java.util.List;

/**
*
*/
public interface MenuService extends IService<Menu> {

    /**
     * 查询某角色下的菜单ids
     * @param roleId
     * @return
     */
    List<String> queryMenuListByRole(String roleId);

    /**
     * 将菜单转为树形结构
     * @param menuIds
     * @return
     */
    List<Menu> convertMenuToTree(List<String> menuIds);

    List<Menu> convertToTree(List<Menu> menus, String parentId);

}
